`timescale 1ns / 1ps
//////////////////////////////////////////////////////////////////////////////////
// Company: 
// Engineer: 
// 
// Create Date:    18:01:25 03/31/2014 
// Design Name: 
// Module Name:    ROM 
// Project Name: 
// Target Devices: 
// Tool versions: 
// Description: 
//
// Dependencies: 
//
// Revision: 
// Revision 0.01 - File Created
// Additional Comments: 
//
//////////////////////////////////////////////////////////////////////////////////
module ROM(instruction,
			  line);

output [18:0]instruction;
input [11:0]line;

//reg [18:0] ROM[4095:0];
//
////load the game
//initial begin
//	$readmemh("SI_ROM.txt",ROM);
//end
//
//assign instruction = ROM[pc];
//	

assign instruction = (line == 0) ? 19'b00000_000_000_0000_0000: // VID
							(line == 1) ? 19'b00000_001_000_0000_0101: // 
							(line == 2) ? 19'b00000_100_000_00000_001: // 
							(line == 3) ? 19'b00011_000_000_0000_1010: // 10 -> R0
							(line == 4) ? 19'b00011_001_000_0000_0101: // 5 -> R1
							(line == 5) ? 19'b00111_100_000_00000_001: // R1+R0 -> R4
							(line == 6) ? 19'b01100_010_001_0000_0010: // r1 - 2 -> r2
							(line == 7) ? 19'b00110_000_010_00000_100: // MEM[r2] <- r4
							(line == 8) ? 19'b00101_111_000_00000_010: // r7 <- Mem[r2]
							(line == 9) ? 19'b01110_000_100_00000_111: // r4 == r7?
   					  (line == 10) ? 19'b10110_00_000000001101: //if false go to 13 
						  (line == 11) ? 19'b00011_111_000_00000001: //1 ->r7
						  (line == 12) ? 19'b10100_00_000000001001: //jump to 9
						  (line == 13) ? 19'b00011_011_000_0010_1010: //set r3 to 42
						  (line == 14) ? 19'b1111111111111111111: //VID
							19'd3;
endmodule
